package cn.hh.hrm.controller;


import cn.hh.hrm.util.AjaxResult;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping
@RestController
public class LoginController {
    @RequestMapping("/success")
    public AjaxResult success(){
        String name = SecurityContextHolder.getContext().getAuthentication().getName();
        return  AjaxResult.me().setMessage(name+"  恭喜您，登录成功");
    }
}
